package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.User;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.query.UserQuery;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface IUserService {
    void save(User user);

    User get(Long id);

    /**
     * 查询所有的用户,模拟好友
     * @param qo:查询对象
     * @return pageInfo
     */
    PageInfo<User> listAll(UserQuery qo);

    void update(User user);

    void register(User user);

    User login(User user);

    PageInfo<User> query(QueryObject qo);

    void saveByUserIdAndFollowId(Long userId, Long followId);

    Integer selectRelationsByUserIdAndFollowID(Long userId, Long followId);

    void deleteRelation(Long followId);

    int getFansByUserId(Long userId);

    int getFollowsByFollowId(Long followId);

    List listTravelersById(Long userId);
}
